hackerrank ruby enumerable each with index solution

welcome to shbcf.ru